package ai.assist.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.IdTypeEnum;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统用户角色
 * @TableName sys_user_role
 */
@CollectionName(value ="sys_user_role")
@Data
public class SysUserRole implements Serializable {

    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    private String id;

    /**
     *
     */
    @CollectionField(value = "user_id")
    private String userId;

    /**
     * 角色id
     */
    @CollectionField(value = "role_id")
    private String roleId;

    /**
     * 创建时间
     */
    @CollectionField(value = "create_time")
    private Date createTime;

    /**
     * 乐观锁
     */
    @CollectionField(value = "version_no")
    private Integer versionNo;

    @CollectionField(exist = false)
    private static final long serialVersionUID = 1L;
}
